﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Menu2.ascx.cs" Inherits="ZHDJ.Web.PortalParts.Menu2" %>
<div style="background:#fff;box-shadow: 0 4px 10px rgba(0,0,0,0.1);">    
    <div class="s_menu_bar">
        <div style="float: left; min-width: 664px;">
            <div id="nav" runat="server" class="nav_menu"></div>
        </div>
        <div class="search">         
            <input type="text" class="keyword" id="keyword" name="keyword" placeholder="请输入关键词"/>
            <input type="button" id="btn_check" name="btn_check" value="搜索" onclick ="Search();" />          
        </div>
        <div style="float: right; text-align: center;margin-top: 9px;">
            <ul class="fr" runat="server" id="noLogin">
                <li style="width: 35px; text-align: left;">
                    <a href="Register.aspx">注册</a>
                </li>
                <li class="spacer"></li>
                <li>
                    <a href="/Login.aspx" class="ilogin">登录</a>
                </li>
            </ul>
            <ul class="fr" runat="server" id="logined" visible="false">
                <li style="width: 40px; text-align: left; margin-left: 0">
                    <div class="UpLayer">
                        <dl>
                            <dt><a href="javascript:void(0);" style="color: #e60000;">操作</a> </dt>
                            <dd>
                                <a href="/app/PersonalMain.aspx" target="_blank">个人中心</a>
                                <asp:Literal runat="server" ID="litBranchMain" Visible="false">                    
									<a href="/app/BranchMain.aspx" target="_blank">组织中心</a>
                                </asp:Literal>
                                <asp:Literal runat="server" ID="litMain" Visible="false">                    
									<a href="/app/main.aspx" target="_blank">后台管理</a>
                                </asp:Literal>
                                <asp:Literal runat="server" ID="litBuzhang" Visible="false">                    
									<a href="/app/buzhang.aspx#/App/PersonalCenter/Module/HardParty/HardPartyList.aspx" target="_blank">困难党员</a>
                                </asp:Literal>
                                <a href="javascript:void(0);" onclick="logout()">退出</a>
                            </dd>
                        </dl>
                    </div>
                </li>
                <li class="spacer" style="background: #e60000;"></li>
                <li>
                    <a href="/app/PersonalMain.aspx" class="ilogin" style="color: #e60000;">
                        <asp:Literal runat="server" ID="litUserName"></asp:Literal>
                    </a>
                </li>
            </ul>
            <div class="clear"></div>
            <div style="display: none" id="loginoutDiv">
                <asp:Button runat="server" ID="btnLoginOut" OnClick="btnLoginOut_Click" Text="退出" />
            </div>
        </div>
    <div class="clear"></div>
</div>
</div>
<script src="/Resource/js/superfish/hoverIntent.js"></script>
<script src="/Resource/js/superfish/superfish.js"></script>
<script type="text/javascript">
    $(function () {
        $('.sf-menu').superfish();
        var objStr = ".UpLayer";
        $(objStr).each(function (i) {
            $(this).click(function () {
                $($(objStr + " dd")[i]).show();
                $($(objStr + " dt")[i]).addClass("UpLayer02");
            });
            $(this).hover(function () { }, function () {
                $($(objStr + " dd")[i]).hide();
                $($(objStr + " dt")[i]).removeClass("UpLayer02");
            });
        });
    });
    //退出
    function logout() {
        $("#loginoutDiv input").click();
    }

    function Search() {
        var searchtext = $("#keyword").val();
        if (searchtext != "") {
            window.location.href = "/MorePage.aspx?module=WebsiteSearch&category=Basic&SearchText=" + searchtext;
        } else {
            alert("搜索关键字不能为空！");
        }
    }
</script>
